import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = { auth: true }

export default {
    path: '/ueditor',
    name: 'ueditor',
    meta,
    redirect: { name: 'ueditor' },
    component: layoutHeaderAside,
    children: (pre => [
        // {
        //     path: 'ueditor_demo',
        //     name: `${pre}ueditor`,
        //     component: _import('ueditor/ueditor_demo'),
        //     meta: {
        //         ...meta,
        //         title: '富文本'
        //     }
        // },
        {
            path: 'd2_ueditor',
            name: `${pre}d2_ueditor`,
            component: _import('ueditor/d2_ueditor'),
            meta: {
                ...meta,
                title: 'ueditor'
            }
        }
    ])('ueditor-')
}
